pp108 : GetObjectsByAttribute (Deprecated)

GetObjectsByAttribute (Deprecated)

 

This method is used to retrieve an object based on its special attribute. GetObjectsByAttribute is part of the CoBOC Methodset 4.2 in the Cordys CoBOC application package.

SOAP Request

<GetObjectsByAttribute xmlns="http://schemas.cordys.com/1.0/coboc">
    <query>get /Vendor/Product where ProductId == "100"</query>
    <version>organization</version>
    <cursor numRows="2"/>
    <metadata>true</metadata>
</GetObjectsByAttribute>

Request Parameters

Parameter

Description

Data Type

Accepted Input Values

query

Contains a set of statements that facilitate querying an object

String (SQL)

Example:

<query>
 {get<path of the template>where<name of the attribute><operator><value>and/or<name of the attribute>
<operator><value>\}
</query>

Note:
When querying on an attribute, it is recommended to use the alias defined while setting the special attribute.

version

Contains the space (organization or user or ISV) to which the object belongs

String

The supported versions are:

  • user
  • organization
  • isv

cursor

Indicates the maximum number of rows to be returned by a request as a result of a query

String

Subsequent requests will return the next set of rows

metadata

Contains the metadata of the request

String(XML)

True/False. If set tofalse, the response will not contain the metadata.The default value istrue.

SOAP Response

<GetObjectsByAttributeResponse xmlns="http://schemas.cordys.com/1.0/coboc">
    <cursor numRows="2"/>
    <tuple>
        <old>
            <data>
                <metadata>
                    <object_id>11720266794461</object_id>
                    <folder_id>117117382112910</folder_id>
                    <objectname>Prod_obj1</objectname>
                    <key>/Vendor/Prod_obj1</key>
                    <organization>o=system,cn=cordys,o=vanenburg.com</organization>
                    <owner>cn=Jdoe,cn=organizational users,o=system,cn=cordys,o=vanenburg.com</owner>
                    <description/>
                    <customkey>33615803</customkey>
                    <history>0</history>
                    <event>0</event>
                    <template_id>11745312963608</template_id>
                    <lastmodifieddate>1173097363566</lastmodifieddate>
                </metadata>
                <object>
                    <Product xmlns="">
                        <Id>100</Id>
                        <Name>Stereo</Name>
                    </Product>
                </object>
            </data>
        </old>
    </tuple>
</GetObjectsByAttributeResponse>

Response Parameters

Parameter

Description

old

Indicates that the object contained in the request exists in the database

object_id

Unique ID identifying the object

folder_id

Unique ID identifying the folder

objectname

Name of the object

key

Name of the object along with the full path

organization

Organization in which the object has been inserted

owner

User who instantiated the object

description

Description of the object

customkey

Custom key of the object. Defined on an attribute of a template, the custom key prevents replication of the object and maintains object uniqueness.

history

Indicates whether the object is being monitored

event

Information about events defined on the object. Events help track changes in the state of the object.

template_id

Unique ID identifying the template

lastmodifieddate

Indicates the last date and time of modification of the object

object

Inserted object enclosed within this element